<?php
//session start and enable gzip 
//require commons
$includePath = dirname(__FILE__);
require_once "{$includePath}/constant.php";  
require_once "{$includePath}/config.php";
require_once "{$includePath}/util.php";

require_once "{$includePath}/../lang/zh_en.php";

//require_once "{$includePath}/../dao/wrapper.php";
//require_once "{$includePath}/../dao/implements.php";
//require_once "{$includePath}/../dao/dbpool.php"; 
require "{$includePath}/../dao/wrapper.php";
require "{$includePath}/../dao/implements.php";
require "{$includePath}/../dao/dbpool.php"; 

/*
 * init some global object
 * include dblink, daoimpl, log
 * by lane @2012-01-01
*/
$dbLink = DBPool::getLink($config[DBDRIVER]);
$daoImpl = DAOImpl::getImpl($dbLink, $config[TABLEPRE]); 

$config[DBLINK] = $dbLink;
$config[DAOIMPL] = $daoImpl; 

//filter get and post parameters
cleanParameters($_GET);
cleanParameters($_POST); 
if(!isset($successMsg)){
	$successMsg = "";
}
if(!isset($errorMsg)){
	$errorMsg = "";
}